package com.sw.funfuck.common.common;

/**
 * 操作
 * Created by zgming on 2017/12/28.
 */
public enum OperateEnum {
    USE(1, "使用", "USE"), EXPORT(2, "结果导出", "EXPORT"), DELETE(3, "删除", "DELETE"), QUERY(4, "查看", "QUERY"),
    EDIT(5, "编辑", "EDIT");
    
    

    private int id;
    private String name;
    private String code;

    OperateEnum(int id, String name, String code){
        this.id = id;
        this.name = name;
        this.code = code;
    }

    public static String getNameById(int id){
        for(OperateEnum e : OperateEnum.values()){
            if(e.getId() == id){
                return e.getName();
            }
        }
        return "";
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
